<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>订单查询</title>
<link rel="stylesheet" href="/Public/Home/css/common.css"/>
<script src="/Public/Home/js/jquery-1.8.3.min.js"></script>
<style>#wimoban_p,#wimoban_p a{color:#fff; font-family:"微软雅黑";}
#wimoban_p{text-align:center; font-size:14px; clear:both;}
.info {font-size: 14px;}
.info thead td {padding-left: 40px;font-weight:bold;text-align:center;}
.info tbody td {padding-left: 40px;text-align:center;}
.noinfo {font-size: 18px;	padding-top: 60px;}
</style>
</head>	
<!--<body oncontextmenu='return false' ondragstart='return false'>-->
<body>
<div id="wrapper">
	<div class="skinBg" style="background-image: url('/Public/Home/images/65.jpg');"></div>
	<div class="content tc">
		<p class="logo"><img width="270" height="129" src="/Public/Home/images/logo_white.png" alt="logo" /></p>
		<div class="searchBox">
				<input type="text" class="searchIpt f14" name="search_data" id="search_data" placeholder="请输入手机号或者订单号" maxlength="100" autocomplete="off"/>
				<input type="button" class="btn cp" id="do_search" value="订单查询" />
		</div>
		<div class="mainContents oh">
			<div class="ctnerWrapper">
				<div id="show_info" class="ctnerBox" style="display: none">
					<div id="cbox-1" class="cbox tl dn">
						<div class="ctnerTab pr tc">
							<a href="#" class="on">订单信息</a>
						</div>
					</div>
					<div id="order_info" >
						<table class="info">
							<thead>
								<tr>
									<td>订单号</td>
									<td>商品名称</td>
									<td>购买数量</td>
									<td>消费者姓名</td>
									<td>联系方式</td>
									<td>购买时间</td>
								</tr>
							</thead>
							<tbody>
								<tr id="list">

								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div class="ctnerBox" id="hiden_info">
					<div>
						<p class="noinfo">请输入手机号或者订单号查询对应的订单信息</p>
					</div>
				</div>
			</div>
		</div>
	</div>
	<footer id="footer" class="tc">©2016 豌豆帮--您的建站助手</footer>
</div>
<script>
	$(function(){
		$("#do_search").click(function (msg) {
			var search_data = $("#search_data").val();
			$.get("/Index/search",{"search_data":search_data},function(result){
				result = eval("("+result+")");
				var html = "";
				if(result.status==1){
					$("#hiden_info").hide();
					val = result.data;
					html = "<td>"+ val.order_code+"</td>"+
							"<td>"+ val.goods_name+"</td>"+
							"<td>"+ val.goods_count+"</td>"+
							"<td>"+ val.customer_name+"</td>"+
							"<td>"+ val.customer_phone+"</td>"+
							"<td>"+ val.created_at+"</td>";
					$("#list").html(html);
					$("#show_info").show();
				}else{
					alert(result.msg);
				}
			});
		});
	});
</script>

</body>
</html>